package com.own.business.exam.entity.map;


import com.own.business.exam.entity.po.ExamRuleQuestion;
import com.own.component.common.base.entity.BaseMap;
import com.own.constant.ConstantBeanSuffix;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * ExamRuleQuestionMapVo
 *
 * @author 陈学礼 （你是一段成熟的代码，要学会自己改bug）
 * @version 4.0.0
 * @date 2021/05/18 14:43:47
 * @since 4.0.0
 */
@ApiModel("考试规则题目表" + ConstantBeanSuffix.MAP_VO)
@Getter
@Setter
@ToString
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class ExamRuleQuestionMapVo extends BaseMap<ExamRuleQuestion> {

    @ApiModelProperty("规则id")
    private Long ruleId;

    @ApiModelProperty("题目id")
    private Long questionId;

    @ApiModelProperty("题目分数")
    private BigDecimal score;

    @ApiModelProperty("答对一部分的分数")
    private BigDecimal someRightScore;

    /**
     * 构造方法
     *
     * @param entity 原对象
     */
    public ExamRuleQuestionMapVo(@NonNull ExamRuleQuestion entity) {
        super(entity);
        this.ruleId = entity.getFkRuleId();
        this.questionId = entity.getFkQuestionId();
        this.score = entity.getScore();
        this.someRightScore = entity.getSomeRightScore();
    }
}
